//
//  HandNetWorkErrorUtil.m
//  mmbang
//
//  Created by lihuaming on 15/12/4.
//  Copyright © 2015年 iyaya. All rights reserved.
//

#import "HandNetWorkErrorUtil.h"
#import "NetWorkErrorAlterView.h"

@implementation HandNetWorkErrorUtil
+ (instancetype)instance {
    static dispatch_once_t onceToken;
    static HandNetWorkErrorUtil *theInstance;
    dispatch_once(&onceToken, ^{
        theInstance = [[HandNetWorkErrorUtil alloc] init];
    });
    return theInstance;
}

- (id)init{
    self = [super init];
    if (self) {
        _popAlterView = [[KeyWindowPopAlterView alloc] init];
        kWeakSelf
        _popAlterView.dissPopAlterBlock =^(KeyWindowPopAlterView*keyWindowPopAlterView){
            weakSelf.isShow = NO;
        };
    }
    return self;
}

- (void)showPopAlterView{
    if (_isShow) {
        return;
    }
    _isShow = YES;
    NetWorkErrorAlterView *versionUpdateView = [[NetWorkErrorAlterView alloc] initWithFrame:CGRectMake(0, 0,  223, 220)];
    [_popAlterView showAlterView:versionUpdateView];
}

@end
